Repository navigation
Retry a page that did not settle once, then save its differing frames - #83
Merged
Merged
Conversation
The settle check requeues the job once. If it fails again, each unsettled side's last two frames are written as <shot>.<side>.unsettled-a/-b.png, listed as frames on the error result, and the message gives the box they differ in. Fixes #77 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tmashara
force-pushed
the
claude/issue-77-unsettled-retry
branch
from
October 29, 2026 17:59
a188fcd to
b8d4f2d
Compare
# Conflicts: # tests/fixtures/pages/README.md
This was referenced Oct 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / why
When more than 25% of a shot was unstable,
page did not settlewas thrown on the first try and nothing was written. That made it hard to tell a page that was slow once from one that really keeps moving, and gave no clue what was moving.Now:
retried: true, so the retry reuses the whole job body: the blank gate, the hook rerun and a freshgoto.doneisn't bumped on a requeue, so[N/M]and the totals count each shot once. Results are still sorted by job order.capture()now keepsprev(the frame beforepng), but only on shots that ended unstable. For each unsettled side, both frames are written and listed asframeson the error result, left before right. The message gives one bounding box of the motion, e.g.page did not settle: 3144495px unstable at /love, again on retry; right: love.1440.right.unsettled-a.png vs -b differ within 1440×2183 at (0,96).Files written
{slug}.{width}.{side}.unsettled-a.pngand…-b.png, only for a side that ended unstable.ours()accepts them, so the out dir is still wipeable.files()returns an error result'sframes, so--rerun-faileddeletes stale frames once the shot passes.Cut
Element naming. There's no
locate()and nocompare()of the two frames: the page is still moving, locate costs up toLOCATE_TIMEOUT, and on a reflow compare can return bands with no regions. Instead each side gets one mask bounding box. Two far-apart movers give one big box, and the frames show which is which.How tested
/unsettled: the test now asserts 4 GETs (2 sides × 2 attempts), theagain on retrymessage with its box, and 2 or 4framesthat exist as images and are named in the message.unsettled-oncegenerated fixture: only its first render recolours. It must compare clean (code 0, no diff, no unstable pixels) after 4 GETs.x.1440.left.unsettled-a.pngand asserts it gets wiped.src/change, all three new assertions fail: 2 vs 4 hits, exit 3 vs 0, and the dir is refused as not wipeable. With it they pass.npm run typecheck,lint,format:check,npm test(308 pass) andnpm run test:visual(336 pass) are all green locally on macOS.Docs updated:
docs/output.md,docs/how-it-works.md, andskills/renderdiff/reference.md(the error table and the results.json fields).Fixes #77
🤖 Generated with Claude Code